package per.turtle.common.swagger.annotation;

import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.enums.SecuritySchemeIn;
import io.swagger.v3.oas.annotations.enums.SecuritySchemeType;
import io.swagger.v3.oas.annotations.info.Contact;
import io.swagger.v3.oas.annotations.info.Info;
import io.swagger.v3.oas.annotations.info.License;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.security.SecurityScheme;
import io.swagger.v3.oas.annotations.servers.Server;

import java.lang.annotation.*;

/**
 * @author Aboom
 */
@Documented
@Inherited
@OpenAPIDefinition(info = @Info(title = "${springdoc.title}", license = @License(name = "${springdoc.license.name}", url = "${springdoc.license.url}"), contact = @Contact(name = "${springdoc.contact.name}", email = "${springdoc.contact.email}", url = "${springdoc.contact.url}"), version = "${springdoc.version}", description = "${springdoc.description}"), security = @SecurityRequirement(name = "JWT"), servers = {@Server(url = "${springdoc.server}")})
@SecurityScheme(name = "JWT", type = SecuritySchemeType.HTTP, bearerFormat = "JWT", scheme = "bearer", in = SecuritySchemeIn.HEADER)
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
public @interface EnableCustomSwagger {

}
